package com.bbarou.supercifs;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class DatabaseHelper extends SQLiteOpenHelper {

	public DatabaseHelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
		Log.v("SUPERCIFS","CIFS_DB version"+version);
		
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		Log.v("SUPERCIFS","CIFS_DB version"+db.getVersion());
		db.execSQL("CREATE TABLE servers (id INTEGER PRIMARY KEY ASC, name TEXT,ip TEXT)");
		db.execSQL("CREATE TABLE mountpoints (id INTEGER PRIMARY KEY ASC, name TEXT,server TEXT,share_name TEXT,local_path TEXT, username TEXT, password TEXT, type TEXT, options TEXT,status INTEGER)");
		
		db.setVersion(1);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub

	}


	
}
